﻿<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="Workflow.Web.Common" %>
<%@ Import Namespace="Workflow.Web.Models" %>
<%@ Import Namespace="Workflow.Resource" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>
        <%=  Global.admin  %></title>
    <link href="../../Content/default.css" rel="stylesheet" type="text/css" />
    <link href="../../Scripts/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <link href="../../Scripts/themes/icon.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.easyui.min.1.2.2.js" type="text/javascript"></script>
 
    <script src="../../Scripts/outlook2.js" type="text/javascript"></script>
    <script src="../../Scripts/tooltips/jquery.qtip-1.0.0-rc3.min.js" type="text/javascript"></script>
    <script type="text/javascript">

        function msgShow(title, msgString, msgType) { $.messager.alert(title, msgString, msgType); }
        $(document).ready(function () {
            $('.usertooltips').qtip({
                content: ' <%=  Global.username  %>：<%=Session[ConfigReader.AuthorizeSessionUserName] %>   <br/> <%=  Global.BelongGroup  %>：<%=Session[ConfigReader.AuthorizeSessionUserGroup]%> <br/> <%=  Global.BelongRole  %>：<%=Session[ConfigReader.AuthorizeSessionUserRole]%> <br/> ',
                show: 'mouseover',
                hide: 'unfocus',
                style: {
                    width: 150,
                    height: 100,
                    padding: 0,
                    tip: true,
                    name: 'cream'

                }


            });
            function serverLogin() {
                var $newpass = $('#txtNewPass');
                var $rePass = $('#txtRePass');
                if ($newpass.val() == '') { msgShow('<%=Global.SystemPrompts %>', '<%=Global.inputpassword %>', 'warning'); return false; }
                if ($rePass.val() == '') { msgShow('<%=Global.SystemPrompts %>', '<%=Global.reinputpassword %>', 'warning'); return false; }
                if ($newpass.val() != $rePass.val()) { msgShow('<%=Global.SystemPrompts %>', '<%=Global.passworddifferent %>', 'warning'); return false; }
                $.post('/user/EditPasswordForCurrentUser/?newpass=' + $newpass.val(),
                 function (data) {
                     eval('data=' + data);
                     //closePwd();
                     if (data.Success) {

                         $.messager.alert('<%=Global.InfoTitle%>', data.Message, 'info');

                     } else {
                         $.messager.alert('<%=Global.ErrorTitle%>', data.Message, 'error');

                     }

                     $newpass.val('');
                     $rePass.val(''); 
                     })
            }
            $(function () {

                // openPwd();

                $('.editpass').click(function () { $('#w').window('open'); });
                $('#btnEp').click(function () { serverLogin(); })
                $('#btnCancel').click(function () { $('#w').window('close'); })

                $('.loginOut').click(function () {

                    $(document).bind("keydown", function (event) {
                        if (event.keyCode == 13) { location.href = '/Account/LogOff'; }
                    })

                    //  $(document).keydown(function (event) { if (event.keyCode == 13) { location.href = '/Account/LogOff'; } });
                    $.messager.confirm('　', ' <%=Global.LogOffConfim %>', function (r) {
                        if (r) { location.href = '/Account/LogOff'; }
                        else {
                            $(document).unbind("keydown")


                        }
                    });

                })
            });
            
        })

        $(function () {
            $.messager.defaults = { ok: "はい", cancel: "いいえ" };
        });
      


    </script>
</head>
<body class="easyui-layout" style="overflow-y: hidden" scroll="no">
    <noscript>
        <div style="position: absolute; z-index: 100000; height: 2046px; top: 0px; left: 0px;
            width: 100%; background: white; text-align: center;">
            <img src="../../image/noscript.gif" alt='<%=Global.noscript %>' />
        </div>
    </noscript>
    <div region="north" split="false" border="false" style="overflow: hidden; height: 30px;
        background: url(../../image/layout-browser-hd-bg.gif) #7f99be repeat-x center 50%;
        line-height: 20px; color: #fff; font-family: Verdana, 微软雅黑,黑体">
        <span style="float: right; padding-right: 20px;" class="head">
            <%=Global.welcome %>
            <a href="javascript:void(0)" class="usertooltips">
                <%=Session[ConfigReader.AuthorizeSessionUserName] %></a> <a href="#" class="editpass">
                    <%=Global.changepassword %></a> <a href="#" class="loginOut">
                        <%=Global.logoff%></a>   </span><span style="padding-left: 10px; font-size: 16px;">
                                <img src="../../image/blocks.gif" width="20" height="20" align="absmiddle" />
                                <%=Global.admin %>
                            </span>
    </div>
    <div region="south" split="false" style="height: 30px; background: #D2E0F2;">
        <div class="footer">
            Workflow|
            <%=Global.version %>:<%=ConfigReader.WorkFlowVersion%></div>
    </div>
    <div region="west" hide="true" split="true" title="<%=Global.navigationmenu%>" style="width: 180px;"
        id="west">
        <div id="nav" class="easyui-accordion" fit="true" border="false">
            <!--  导航内容 -->
        </div>
    </div>
    <div id="mainPanle" region="center" style="background: #eee; overflow-y: hidden">
        <div id="tabs" class="easyui-tabs" fit="true" border="false">
            <div title="Welcome" style="padding: 20px; overflow: hidden; background: #e3f1f3;"
                id="home">
                <iframe scrolling="yes" frameborder="0" src="" style="width: 100%; height: 100%;">
                </iframe>
                <iframe name="mainFrame" scrolling="auto" frameborder="0" style="width: 100%; height: 0%;">
                </iframe>
            </div>
        </div>
    </div>
    <!--修改密码窗口-->
    <div id="w" class="easyui-window" title="<%=Global.changepassword %>" collapsible="false" minimizable="false"
        maximizable="false" icon="icon-save" style="width: 300px; height: 170px; padding: 5px;
        background: #fafafa;" closed="true">
        <div class="easyui-layout" fit="true">
            <div region="center" border="false" style="padding: 10px; background: #fff; border: 1px solid #ccc;">
                <table cellpadding="3">
                    <tr>
                        <td>
                            <%=Global.newpassword %>：
                        </td>
                        <td>
                            <input id="txtNewPass" type="Password" class="txt01" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <%=Global.confirmpassword %>：
                        </td>
                        <td>
                            <input id="txtRePass" type="Password" class="txt01" />
                        </td>
                    </tr>
                </table>
            </div>
            <div region="south" border="false" style="text-align: right; height: 30px; line-height: 30px;">
                <a id="btnEp" class="easyui-linkbutton" icon="icon-ok" href="javascript:void(0)">
                    <%=Global.ok %></a> <a id="btnCancel" class="easyui-linkbutton" icon="icon-cancel"
                        href="javascript:void(0)">
                        <%=Global.cancel %></a>
            </div>
        </div>
    </div>
    <div id="mm" class="easyui-menu" style="width: 150px;">
        <div id="mm-tabupdate">
            <%=Global.refresh %></div>
        <div class="menu-sep">
        </div>
        <div id="mm-tabclose">
            <%=Global.close %></div>
        <div id="mm-tabcloseall">
            <%=Global.allclose %></div>
        <div id="mm-tabcloseother">
            <%=Global.closewithoutme %></div>
        <div class="menu-sep">
        </div>
        <div id="mm-tabcloseright">
            <%=Global.closeright %></div>
        <div id="mm-tabcloseleft">
            <%=Global.closeleft %></div>
        <div class="menu-sep">
        </div>
        <div id="mm-exit">
            <%=Global.quit %></div>
    </div>
    <%--菜单内容 --%>
   <%-- <div id="mm1" style="display: none" style="width: 150px;">
        <div icon="icon-undo">
            Undo</div>
        <div icon="icon-redo">
            Redo</div>
        <div class="menu-sep">
        </div>
        <div class="menu-sep">
        </div>
        <div>
            <span>
                <%=Global.changelang %></span>
            <div style="width: 150px;">
                <div>
                    <%:Html.LanguageSelectorLink("en-US", "English", "English", null)%></div>
                <div>
                    <%:Html.LanguageSelectorLink("zh-CN", "中文", "中文", null)%>
                </div>
                <div>
                    <%:Html.LanguageSelectorLink("ja-JP", "日本语", "日本语", null)%>
                </div>
            </div>
        </div>
        <div icon="icon-remove">
            Delete</div>
        <div>
            Select All</div>
    </div>--%>
</body>
</html>
